package com.yuhuihui.common.domain;

import java.io.Serializable;
import java.util.List;

/**
 * tree实体类基类
 *
 * @author yuhh
 * @date 2023-05-25 14:54:30
 * @see Serializable
 */
public class BaseTreeEntity<T extends BaseTreeEntity<T>> implements Serializable {

    /**
     * id
     */
    private Integer id;

    /**
     * 父id
     */
    private Integer parentId;

    /**
     * 子项目
     */
    private List<T> children;

    public BaseTreeEntity(Integer id, Integer parentId){
        this.id = id;
        this.parentId = parentId;
    }

    public BaseTreeEntity(){
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getParentId() {
        return parentId;
    }

    public void setParentId(Integer parentId) {
        this.parentId = parentId;
    }

    public List<T> getChildren() {
        return children;
    }

    public void setChildren(List<T> children) {
        this.children = children;
    }
}
